/*--------------------------------------------------------------------------------------------------------------------
 *  -------------------------------------------------------------------------------------------------------------------
 *
 *  Filename: audio_api.h
 *
 *  Description: audio interface
 *
 *  History:
 *  Jan 9, 2020- Li Tang Creation of file
 *
 *  Notes:
 *
 ******************************************************************************/
#ifndef _AUDIO_API_H
#define _AUDIO_API_H

#include "gbl_types.h"


//ICAT EXPORTED ENUM
typedef enum
{
    AUDIOHAL_SPK_MUTE = 0,
    AUDIOHAL_SPK_VOL_1,
    AUDIOHAL_SPK_VOL_2,
    AUDIOHAL_SPK_VOL_3,
    AUDIOHAL_SPK_VOL_4,
    AUDIOHAL_SPK_VOL_5,
    AUDIOHAL_SPK_VOL_6,
    AUDIOHAL_SPK_VOL_7,
    AUDIOHAL_SPK_VOL_8,
    AUDIOHAL_SPK_VOL_9,
    AUDIOHAL_SPK_VOL_10,
    AUDIOHAL_SPK_VOL_11,

	AUDIOHAL_SPK_VOL_MAX = AUDIOHAL_SPK_VOL_11

} AUDIOHAL_SPK_LEVEL_T;


void AudioHAL_AifSetVolume(UINT32 vol);

UINT32 AudioHAL_AifGetVolume(void);

void AudioHAL_AifSetMute(BOOL onoff);

void AudioHAL_AifUseSSPA(void);

void AudioHAL_AifUseInternalCodec(void);




#define TTS_SPEED_MIN					-32768		/* slowest voice speed */
#define TTS_SPEED_NORMAL				0			/* normal voice speed (default) */
#define TTS_SPEED_MAX					+32767		/* fastest voice speed */

/*****************************************************************
* Function: yuge_tts_tm8211_init
*
* Description:
* 	该函数用于pcm外挂tm8211的相关初始化。
* 
* Parameters:
* 	NONE
* Return:
* 	NONE
*
*****************************************************************/
void yuge_tts_tm8211_init(void);


/*****************************************************************
* Function: yuge_tts_speed
*
* Description:
* 	该函数用于设置TTS语速。
* 
* Parameters:
* 	speed	  	[In] 	-32768~+32767， 0 是正常语速;
* Return:
* 	NONE
*
*****************************************************************/
void yuge_tts_speed(int speed);

/*****************************************************************
* Function: yuge_tts_start
*
* Description:
* 	该函数用于设置TTS语速。
* 
* Parameters:
* 	buf	  	  [In] 小端unicode文本;
* 	buflen  	[In] 小端unicode文本SIZE，最大128个汉字(512 char);
* 	tts_cb  	[In] tts播放回调函数，回调触发即播放结束;
* 	userdata	[In] userdata;
* Return:
* 	NONE
*
*****************************************************************/
void yuge_tts_start(char *buf, int buflen, void  (*tts_cb)(int , int), int userdata);

#endif

